package com.jml.核心注解002.config;


import com.jml.核心注解002.entity.MyEntity;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author:jml
 * @date: 2019/9/23 11:26
 * @description：
 */
public class MyFactoryBean implements FactoryBean<MyEntity> {


    @Override
    public MyEntity getObject() throws Exception {
        return new MyEntity();
    }


    @Override
    public Class<?> getObjectType() {
        return MyEntity.class;
    }

    @Override
    public boolean isSingleton() {
     //默认true表示单例
        return true;
    }
}
